/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package gui.Almacen;

import gui.General.Main;

/**
 *
 * @author César
 */
public class SolicitudesEnviadas extends javax.swing.JInternalFrame {

    GestionAlmacenes gt;
    /** Creates new form SolicitudesEnviadas */
    public SolicitudesEnviadas(GestionAlmacenes gt) {
        this.gt = gt;
        initComponents();
        detalleSolicitudes1.putData("1");
    }
    
    private static SolicitudesEnviadas mynp = null;

    public static SolicitudesEnviadas getInstance(gui.Almacen.GestionAlmacenes gestAlmacen) {
        if (mynp == null) {
            mynp = new SolicitudesEnviadas(gestAlmacen);
            Main.getDesktop().add(mynp);
            mynp.setVisible(true);
            mynp.toFront();
        } else {
            if (mynp.isClosed() || !mynp.isVisible()) {
                mynp = new SolicitudesEnviadas(gestAlmacen);
                Main.getDesktop().add(mynp);
                mynp.toFront();
                mynp.setVisible(true);
            } else {
                mynp.toFront();
            }
        }

        return mynp;
    }
    
    

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        detalleSolicitudes1 = new gui.Almacen.PanelSolicitudes(gt);

        setClosable(true);
        setTitle("Solicitudes Enviadas");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(detalleSolicitudes1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(detalleSolicitudes1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(23, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private gui.Almacen.PanelSolicitudes detalleSolicitudes1;
    // End of variables declaration//GEN-END:variables

}
